package com.ktjiaoyu.yuanzihuan.controller;

import com.ktjiaoyu.yuanzihuan.bean.Article;
import com.ktjiaoyu.yuanzihuan.service.ArticleService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping(value = "/article")
public class ArticleController {

    @Resource
    private ArticleService articleService;
    @RequestMapping(value = "/getArticleList")
    @ResponseBody
    public List<Article> getArticleList() {
        //获取列表信息3.0
        List<Article> list = articleService.findByEnabledAndOrderByOrderNoAscBiz();
        return list;
    }

}
